package enumClass;

public class enumClass {
    public static void main(String[] args) {
        Week week = Week.MON;
        System.out.println(week);
        System.out.println(week.getWeekTitle());
        System.out.println(week.getWeekDesc());
    }
}

enum Week {
    // 定义枚举类的对象, 枚举类的对象必须放在最前面
    MON("星期一", "周一"),
    TUE("星期二", "周二"),
    WED("星期三", "周三"),
    THU("星期四", "周四"),
    FRI("星期五", "周五"),
    SAT("星期六", "周六"),
    SUN("星期日", "周日");

    private final String WeekTitle;
    private final String WeekDesc;

    private Week(String weekTitle, String weekDesc) {
        this.WeekTitle = weekTitle;
        this.WeekDesc = weekDesc;
    }

    public String getWeekTitle() {
        return WeekTitle;
    }

    public String getWeekDesc() {
        return WeekDesc;
    }

}
